Introduction

ShinyApp Link is Here

This project shows interesting findings about the correlation between happiness (rated on a scale from 1-10) and its relationship between various employment sectors in countries around the world.

Our data was supplied from the International Labour Organization, Kaggle, UN, Google Developers, and World Bank

The international Labour Organization website provided us the datasets for Employment by Sector and Status in Employment. Using the data.world query functions, we subset the data from the year 2012 for both of these and joined them together.

Kaggle provided the World Happiness data. This dataset gives a rank by happiness for each country, the region in which the country is in, and a happiness score. The scores are based on the answer to a question asked in the Gallup World Poll. Quoting from Data.World, “This question, known as the Cantril ladder, asks respondents to think of a ladder with the best possible life for them being a 10 and the worst possible life being a 0 and to rate their own current lives on that scale.”

We needed one more categorical variable but could not find any suitable datasets. The UN report on “Country Classification” gave a list of countries determined to be in a category of either: Low Income, Lower Middle Income, Upper Middle Income, High Income. There was not an easily downloadable CSV for this so we created one in Excel. This was not run through an ETL file as there was nothing to clean up as it was only two columns - Country and Income Class. We joined this dataset with the joined employment dataset.

The Google Developers site provided the longitude and latitude data for each country; we then joined this dataset with the previously joined dataset from above.

Finally, to make the data more readable and create a calculated field that calculates the percentage in each sector (Agriculture, Industry, and Service), we had to find the population data for each country. This came form the World Bank website. This dataset was, again, joined with the dataset that has all the other joins.

Our final join was combining the dataset that had all of the above with the World Happiness datset. This was accomplished through an outer join, linking by Country name.

All joins were completed in data.world, with one exception. We joined the World Happiness dataset with the large conglomeration above in Tableau as well.

Below we display our sessionInfo().

sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] cowplot_0.7.0        gridExtra_2.2.1      plyr_1.8.4           plotly_4.6.0         ggplot2_2.2.1       
 [6] leaflet_1.1.0        DT_0.2               shinydashboard_0.5.3 data.world_0.1.2     dplyr_0.5.0         
[11] lubridate_1.6.0      readr_1.1.0          shiny_1.0.0         

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.10      base64enc_0.1-3   bitops_1.0-6      tools_3.3.2       digest_0.6.11     evaluate_0.10    
 [7] jsonlite_1.3      tibble_1.3.0      gtable_0.2.0      viridisLite_0.2.0 DBI_0.5-1         crosstalk_1.0.0  
[13] yaml_2.1.14       knitr_1.15.1      stringr_1.1.0     httr_1.2.1        htmlwidgets_0.8   hms_0.3          
[19] rprojroot_1.2     grid_3.3.2        R6_2.2.0          rmarkdown_1.3     RJSONIO_1.3-0     purrr_0.2.2      
[25] tidyr_0.6.1       magrittr_1.5      backports_1.0.5   scales_0.4.1      htmltools_0.3.5   rsconnect_0.7    
[31] assertthat_0.1    mime_0.5          xtable_1.8-2      colorspace_1.3-2  httpuv_1.3.3      labeling_0.3     
[37] stringi_1.1.2     RCurl_1.95-4.8    lazyeval_0.2.0    munsell_0.4.3    
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  EOF within quoted string

The Data

Cleaning Up World Happiness Dataset

This data was not difficult to clean up and remained largey untouched.

source("../01 Data/R_ETL_World_Happiness.R")
Parsed with column specification:
cols(
  Country = col_character(),
  Region = col_character(),
  Happiness.Rank = col_integer(),
  Happiness.Score = col_double(),
  `Standard Error` = col_double(),
  `Economy (GDP per Capita)` = col_double(),
  Family = col_double(),
  `Health (Life Expectancy)` = col_double(),
  Freedom = col_double(),
  `Trust (Government Corruption)` = col_double(),
  Generosity = col_double(),
  `Dystopia Residual` = col_double()
)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   158 obs. of  12 variables:
 $ Country                      : chr  "Switzerland" "Iceland" "Denmark" "Norway" ...
 $ Region                       : chr  "Western Europe" "Western Europe" "Western Europe" "Western Europe" ...
 $ Happiness.Rank               : int  1 2 3 4 5 6 7 8 9 10 ...
 $ Happiness.Score              : num  7.59 7.56 7.53 7.52 7.43 ...
 $ Standard Error               : num  0.0341 0.0488 0.0333 0.0388 0.0355 ...
 $ Economy (GDP per Capita)     : num  1.4 1.3 1.33 1.46 1.33 ...
 $ Family                       : num  1.35 1.4 1.36 1.33 1.32 ...
 $ Health (Life Expectancy)     : num  0.941 0.948 0.875 0.885 0.906 ...
 $ Freedom                      : num  0.666 0.629 0.649 0.67 0.633 ...
 $ Trust (Government Corruption): num  0.42 0.141 0.484 0.365 0.33 ...
 $ Generosity                   : num  0.297 0.436 0.341 0.347 0.458 ...
 $ Dystopia Residual            : num  2.52 2.7 2.49 2.47 2.45 ...
 - attr(*, "spec")=List of 2
  ..$ cols   :List of 12
  .. ..$ Country                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Region                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Happiness.Rank               : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Happiness.Score              : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Standard Error               : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Economy (GDP per Capita)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Family                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Health (Life Expectancy)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Freedom                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Trust (Government Corruption): list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Generosity                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Dystopia Residual            : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  ..$ default: list()
  .. ..- attr(*, "class")= chr  "collector_guess" "collector"
  ..- attr(*, "class")= chr "col_spec"
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   158 obs. of  12 variables:
 $ Country                      : Factor w/ 158 levels "Afghanistan",..: 136 59 38 106 25 46 100 135 101 7 ...
 $ Region                       : Factor w/ 10 levels "Australia and New Zealand",..: 10 10 10 10 6 10 10 10 1 1 ...
 $ Happiness.Rank               : Factor w/ 157 levels "1","10","100",..: 1 71 82 93 104 115 126 137 147 2 ...
 $ Happiness.Score              : Factor w/ 157 levels "2.839","2.905",..: 157 156 155 154 153 152 151 150 149 148 ...
 $ Standard Error               : Factor w/ 153 levels "0.01848","0.01866",..: 20 101 17 51 27 11 6 12 19 57 ...
 $ Economy (GDP per Capita)     : Factor w/ 158 levels "0","0.0153","0.01604",..: 152 137 140 154 141 135 143 144 130 145 ...
 $ Family                       : Factor w/ 158 levels "0","0.13995",..: 155 158 156 153 152 150 139 142 151 148 ...
 $ Health (Life Expectancy)     : Factor w/ 157 levels "0","0.04776",..: 149 151 129 133 141 135 138 144 142 148 ...
 $ Freedom                      : Factor w/ 158 levels "0","0.07699",..: 157 144 152 158 146 151 139 155 148 153 ...
 $ Trust (Government Corruption): Factor w/ 157 levels "0","0.00227",..: 151 99 154 144 142 150 139 153 152 143 ...
 $ Generosity                   : Factor w/ 158 levels "0","0.00199",..: 116 145 130 133 146 94 151 134 150 144 ...
 $ Dystopia Residual            : Factor w/ 158 levels "0.32858","0.65429",..: 126 135 123 119 117 131 120 110 99 100 ...
 - attr(*, "spec")=List of 2
  ..$ cols   :List of 12
  .. ..$ Country                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Region                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Happiness.Rank               : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Happiness.Score              : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Standard Error               : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Economy (GDP per Capita)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Family                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Health (Life Expectancy)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Freedom                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Trust (Government Corruption): list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Generosity                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Dystopia Residual            : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  ..$ default: list()
  .. ..- attr(*, "class")= chr  "collector_guess" "collector"
  ..- attr(*, "class")= chr "col_spec"

Cleaning Up Joined Employment Dataset This dataset also did not require a lot of cleaning; the joining and subsetting happened in Data.World. There were no commas, strange column headings, etc.

source("../01 Data/R_ETL_GET_status_sector_2012.R")
Duplicated column names deduplicated: 'Location' => 'Location_1' [35]Parsed with column specification:
cols(
  .default = col_integer(),
  Country = col_character(),
  country = col_character(),
  latitude = col_double(),
  longitude = col_double(),
  name = col_character(),
  Location = col_character(),
  `Location(2)` = col_character(),
  `Country Name` = col_character(),
  Population = col_double(),
  Location_1 = col_character(),
  Income.Class = col_character()
)
See spec(...) for full column specifications.
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   189 obs. of  36 variables:
 $ Year                                        : int  2012 2012 2012 2012 2012 2012 2012 2012 2012 2012 ...
 $ Country                                     : chr  "Sweden" "United Kingdom" "Benin" "Saudi Arabia" ...
 $ Total.employment.in.agriculture..thousands. : int  98 362 1800 463 118530 2365 2 4295 205 37229 ...
 $ Male employment in agriculture (thousands)  : int  75 262 1215 460 66686 1503 2 2073 204 23021 ...
 $ Female employment in agriculture (thousands): int  23 100 585 3 51844 862 0 2222 1 14207 ...
 $ Total.employment.in.industry..thousands.    : int  918 5667 338 2445 59904 16800 40 1562 1329 24243 ...
 $ Male employment in industry (thousands)     : int  746 4619 194 2427 39116 12816 30 799 1281 16485 ...
 $ Female employment in industry (thousands)   : int  172 1048 144 18 20788 3984 10 762 47 7758 ...
 $ Total.employment.in.services..thousands.    : int  3653 23543 1995 6895 124291 43130 147 2559 4465 49683 ...
 $ Male employment in services (thousands)     : int  1631 11037 785 5751 67825 21577 80 1333 3635 29911 ...
 $ Female employment in services (thousands)   : int  2023 12506 1211 1144 56465 21553 67 1225 831 19772 ...
 $ Wage and salaried workers                   : int  4179 25213 440 9068 113820 54796 178 3008 5760 38332 ...
 $ Employers                                   : int  175 754 55 192 8133 1565 1 1 185 3207 ...
 $ Own-account workers                         : int  302 3485 3027 515 122345 4183 9 4645 53 51653 ...
 $ Contributing family workers                 : int  12 119 611 27 58426 1751 1 762 2 17963 ...
 $ Vulnerable employment                       : int  314 3605 3638 542 180771 5934 10 5407 54 69616 ...
 $ Wage and salaried workers(2)                : int  2095 12890 356 7930 69086 31177 105 1732 4893 24585 ...
 $ Employers(2)                                : int  138 561 43 189 6272 1321 1 0 177 2622 ...
 $ Own-account workers(2)                      : int  214 2416 1515 496 77933 3036 6 2102 50 37051 ...
 $ Contributing family workers(2)              : int  5 50 280 23 20338 362 0 370 1 5159 ...
 $ Vulnerable employment(2)                    : int  219 2466 1796 519 98270 3398 6 2473 50 42210 ...
 $ Wage and salaried workers(3)                : int  2084 12323 84 1138 44735 23619 73 1276 867 13746 ...
 $ Employers(3)                                : int  38 193 12 3 1861 244 0 0 7 585 ...
 $ Own-account workers(3)                      : int  89 1069 1511 19 44413 1147 3 2542 3 14602 ...
 $ Contributing family workers(3)              : int  7 70 331 3 38088 1389 1 392 1 12804 ...
 $ Vulnerable employment(3)                    : int  96 1139 1842 23 82501 2536 4 2934 4 27406 ...
 $ country                                     : chr  "SE" "GB" "BJ" "SA" ...
 $ latitude                                    : num  60.13 55.38 9.31 23.89 NA ...
 $ longitude                                   : num  18.64 -3.44 2.32 45.08 NA ...
 $ name                                        : chr  "Sweden" "United Kingdom" "Benin" "Saudi Arabia" ...
 $ Location                                    : chr  "POINT(60.128161 18.643501)" "POINT(55.378051 -3.435973)" "POINT(9.30769 2.315834)" "POINT(23.885942 45.079162)" ...
 $ Location(2)                                 : chr  "POINT(60.128161 18.643501)" "POINT(55.378051 -3.435973)" "POINT(9.30769 2.315834)" "POINT(23.885942 45.079162)" ...
 $ Country Name                                : chr  "Sweden" "United Kingdom" "Benin" "Saudi Arabia" ...
 $ Population                                  : num  9519374 63700300 10049792 29496047 NA ...
 $ Location_1                                  : chr  "POINT(60.128161 18.643501)" "POINT(55.378051 -3.435973)" "POINT(9.30769 2.315834)" "POINT(23.885942 45.079162)" ...
 $ Income.Class                                : chr  "High Income" "High Income" "Low Income" "High Income" ...
 - attr(*, "spec")=List of 2
  ..$ cols   :List of 36
  .. ..$ Year                                        : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Country                                     : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Total.employment.in.agriculture..thousands. : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in agriculture (thousands)  : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in agriculture (thousands): list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Total.employment.in.industry..thousands.    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in industry (thousands)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in industry (thousands)   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Total.employment.in.services..thousands.    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in services (thousands)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in services (thousands)   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers                                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers                         : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers                 : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers(2)                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers(2)                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers(2)                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers(2)              : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment(2)                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers(3)                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers(3)                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers(3)                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers(3)              : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment(3)                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ country                                     : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ latitude                                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ longitude                                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ name                                        : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Location                                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Location(2)                                 : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Country Name                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Population                                  : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Location_1                                  : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Income.Class                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  ..$ default: list()
  .. ..- attr(*, "class")= chr  "collector_guess" "collector"
  ..- attr(*, "class")= chr "col_spec"
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   189 obs. of  36 variables:
 $ Year                                        : Factor w/ 1 level "2012": 1 1 1 1 1 1 1 1 1 1 ...
 $ Country                                     : Factor w/ 188 levels "Afghanistan",..: 163 178 17 144 153 85 23 27 177 78 ...
 $ Total.employment.in.agriculture..thousands. : Factor w/ 175 levels "0","10","102",..: 172 96 43 122 15 69 54 115 55 99 ...
 $ Male employment in agriculture (thousands)  : Factor w/ 175 levels "0","1","100",..: 155 79 20 118 146 37 59 64 61 71 ...
 $ Female employment in agriculture (thousands): Factor w/ 149 levels "0","1","10","100",..: 60 4 110 76 105 136 1 57 2 31 ...
 $ Total.employment.in.industry..thousands.    : Factor w/ 175 levels "100","1016","1019",..: 168 128 90 64 138 38 103 33 21 63 ...
 $ Male employment in industry (thousands)     : Factor w/ 178 levels "1015","104","108",..: 151 117 49 62 106 15 85 157 14 32 ...
 $ Female employment in industry (thousands)   : Factor w/ 151 levels "10","1048","105",..: 38 2 25 41 51 92 1 131 100 132 ...
 $ Total.employment.in.services..thousands.    : Factor w/ 186 levels "102","108","1091",..: 115 80 64 158 18 128 38 87 133 141 ...
 $ Male employment in services (thousands)     : Factor w/ 181 levels "101","1015","104",..: 35 7 157 127 143 57 160 22 91 79 ...
 $ Female employment in services (thousands)   : Factor w/ 177 levels "102","10298",..: 58 19 16 14 126 64 144 17 163 54 ...
 $ Wage and salaried workers                   : Factor w/ 182 levels "1021","1024",..: 122 83 127 176 9 141 59 95 146 114 ...
 $ Employers                                   : Factor w/ 143 levels "1","10","1005",..: 39 127 110 48 133 30 1 1 44 81 ...
 $ Own-account workers                         : Factor w/ 179 levels "10","102","1034",..: 96 111 97 143 13 132 170 139 145 144 ...
 $ Contributing family workers                 : Factor w/ 153 levels "0","1","10","104426",..: 18 17 120 70 115 41 2 136 55 43 ...
 $ Vulnerable employment                       : Factor w/ 182 levels "10","1001","10064",..: 90 101 104 146 41 150 1 145 144 162 ...
 $ Wage and salaried workers(2)                : Factor w/ 185 levels "101084","1012",..: 59 25 97 163 147 89 4 43 126 69 ...
 $ Employers(2)                                : Factor w/ 131 levels "0","1","100",..: 20 97 85 37 104 19 2 1 34 60 ...
 $ Own-account workers(2)                      : Factor w/ 180 levels "10","10489","1050",..: 74 84 34 130 163 105 141 72 131 114 ...
 $ Contributing family workers(2)              : Factor w/ 133 levels "0","1","10","11",..: 100 101 56 49 42 78 1 81 2 103 ...
 $ Vulnerable employment(2)                    : Factor w/ 180 levels "10","100","101",..: 77 85 55 141 179 111 146 86 137 126 ...
 $ Wage and salaried workers(3)                : Factor w/ 173 levels "10","1037","104",..: 57 15 162 8 108 64 147 18 165 22 ...
 $ Employers(3)                                : Factor w/ 94 levels "0","1","10","100",..: 55 23 7 46 21 34 1 1 81 73 ...
 $ Own-account workers(3)                      : Factor w/ 169 levels "0","10","100",..: 161 9 38 53 101 13 74 66 74 34 ...
 $ Contributing family workers(3)              : Factor w/ 132 levels "0","1","100",..: 112 113 63 57 72 20 2 73 2 13 ...
 $ Vulnerable employment(3)                    : Factor w/ 172 levels "0","1","100",..: 170 15 59 74 158 79 111 90 111 85 ...
 $ country                                     : Factor w/ 168 levels "","AE","AF","AL",..: 137 53 19 134 1 79 1 82 2 69 ...
 $ latitude                                    : Factor w/ 169 levels "","-0.023559",..: 154 146 167 75 1 101 1 40 71 3 ...
 $ longitude                                   : Factor w/ 169 levels "","-1.023194",..: 88 13 95 137 1 74 1 61 147 65 ...
 $ name                                        : Factor w/ 188 levels "Afghanistan",..: 163 178 17 144 153 85 23 27 177 78 ...
 $ Location                                    : Factor w/ 169 levels "","POINT(-0.023559 37.906193)",..: 154 146 167 75 1 101 1 40 71 3 ...
 $ Location(2)                                 : Factor w/ 169 levels "","POINT(-0.023559 37.906193)",..: 154 146 167 75 1 101 1 40 71 3 ...
 $ Country Name                                : Factor w/ 188 levels "Afghanistan",..: 163 178 17 144 153 85 23 27 177 78 ...
 $ Population                                  : Factor w/ 167 levels "","10033630",..: 165 134 3 73 1 22 101 31 160 63 ...
 $ Location_1                                  : Factor w/ 169 levels "","POINT(-0.023559 37.906193)",..: 154 146 167 75 1 101 1 40 71 3 ...
 $ Income.Class                                : Factor w/ 5 levels "","High Income",..: 2 2 3 2 1 2 2 1 2 4 ...
 - attr(*, "spec")=List of 2
  ..$ cols   :List of 36
  .. ..$ Year                                        : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Country                                     : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Total.employment.in.agriculture..thousands. : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in agriculture (thousands)  : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in agriculture (thousands): list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Total.employment.in.industry..thousands.    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in industry (thousands)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in industry (thousands)   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Total.employment.in.services..thousands.    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Male employment in services (thousands)     : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Female employment in services (thousands)   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers                                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers                         : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers                 : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment                       : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers(2)                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers(2)                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers(2)                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers(2)              : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment(2)                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Wage and salaried workers(3)                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Employers(3)                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Own-account workers(3)                      : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Contributing family workers(3)              : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ Vulnerable employment(3)                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_integer" "collector"
  .. ..$ country                                     : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ latitude                                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ longitude                                   : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ name                                        : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Location                                    : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Location(2)                                 : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Country Name                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Population                                  : list()
  .. .. ..- attr(*, "class")= chr  "collector_double" "collector"
  .. ..$ Location_1                                  : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  .. ..$ Income.Class                                : list()
  .. .. ..- attr(*, "class")= chr  "collector_character" "collector"
  ..$ default: list()
  .. ..- attr(*, "class")= chr  "collector_guess" "collector"
  ..- attr(*, "class")= chr "col_spec"

The Visualizations

Scatterplot

Tableau Version
vis1
Shiny Version
vis2

These visualizations shows that as GDP increases, so does happiness. We also get an indication of the trend of each region in happiness; for example, Australia and New Zealand have a pretty horizontal line. As only two countries are involved, it shows that the disaparity between the two is not high; GDP and Happiness are quite similar for Australia and New Zealand. We also see clustering of countries in the Sub-Saharan Africa region with low happiness scores and low GDPs. Western Europe is on the opposite end of this spectrum with high happiness scores and high GDPs, though there is a fairly large disparity between the happiest country in Europe and the least happy based on the trend line.

Histogram

Shiny Version
vis3

This histogram shows a bimodal distribution with peaks around Happiness Scores of 4.7 and 6. At a peak of around 4.7, Sub-Saharan Africa has the most countries within this bin; at a peak of 6, there is a pretty even split between countries in Latin America and Caribbean.

It was not possible for us to create a histogram like above in Tableau.

Boxplot

Tableau Version
vis4
Shiny Version
vis5

These visualizations show that Sub-Saharan Africa has both the largest percentage of people working in the Agriculture sector and the highest variance of those working in this sector. High income regions such as North America, Western Europe, and Australia and New Zealand have the least variance within each group. Also, the sector with the largest percentage of people working within it for these countries is the Services sector with very few working in the Agriculture sector. The Middle East and Africa has large variance within each group.

Barchart

Tableau Version
vis6
Shiny Version
vis7

We used happiness rank as a kpi (color), and the plot clearly shows us that the richer a country is, no matter which region it is in, it is happier than other countries. We can see the average happiness scores in the black texts. The barcharts show us that Sub-Saharan Africa is the least happy within each income class. Overall, Australia and New Zealand are the happiest. The lines show us the average happiness score of the region. Latin America and the Caribbean are the happiest for both the Upper Middle Income and Lower Middle Income.

Crosstabs

Tableau Version
vis8
Shiny Version
vis9

Each number is the average happiness of the countries who are in this region and whose main sector it is either industry, agriculture, or services. The sector with the lowest happiness score, on average, are the companies whose largest sector is agriculture. The only region that has a country whose main sector is Industry is the Middle East/North Africa. The color corresponds to happiness rank, it is obvious that countries whose main industry is agriculture are the least happy.

Map

Tableau Version
vis10
Shiny Version
vis11

The maps provide shows that the regions of Africa and parts of the Middle East, Eastern Europe, and SouthEastern Asia are the least happy. Northern Europe, most of South America, and North America are largely happy. In the Shiny app you can hover over each marker to find the country and then select the marker to view the country’s happiness rank and score.

For more infomation, checkout our shiny app: https://luwenhui.shinyapps.io/FinalApp/

LS0tDQp0aXRsZTogIjxjZW50ZXI+PGI+SGFwcGluZXNzIEFyb3VuZCB0aGUgV29ybGQ8L2I+PC9jZW50ZXI+Ig0KYXV0aG9yOiAiPGNlbnRlcj48Yj5MdSwgQnJhdWNobGUsIEtvbGlua288L2I+PC9jZW50ZXI+Ig0Kb3V0cHV0Og0KICBodG1sX2RvY3VtZW50Og0KICAgIHNlbGZfY29udGFpbmVkOiBubw0KICAgIHRvYzogeWVzDQogIGh0bWxfbm90ZWJvb2s6DQogICAgdG9jOiB5ZXMNCi0tLQ0KDQojKipJbnRyb2R1Y3Rpb24qKg0KU2hpbnlBcHAgTGluayBpcyBbSGVyZV0oaHR0cHM6Ly9sdXdlbmh1aS5zaGlueWFwcHMuaW8vRmluYWxBcHAvKQ0KDQpUaGlzIHByb2plY3Qgc2hvd3MgaW50ZXJlc3RpbmcgZmluZGluZ3MgYWJvdXQgdGhlIGNvcnJlbGF0aW9uIGJldHdlZW4gaGFwcGluZXNzIChyYXRlZCBvbiBhIHNjYWxlIGZyb20gMS0xMCkgYW5kIGl0cyByZWxhdGlvbnNoaXAgYmV0d2VlbiB2YXJpb3VzIGVtcGxveW1lbnQgc2VjdG9ycyBpbiBjb3VudHJp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